Toriality's Blog

Blog

created_at:

June 4, 2024 at 5:58 PM

last_updated:

July 15, 2024 at 8:11 PM

This blog (You are here!)

This is a blog I've developed from scratch in order to store my thoughts and create a second brain/digital garden/personal wiki. It contains all my thoughts, experiences and ideas, or just some poorly written random notes 'cause why not?

The first attempt to create a personal blog, or a diary, was in 2021, it was my second web programming project that I really put effort on. It was called "my-diary", not very creative name, but I'd leave it private running on my machine and never publish it. The issue was that I never got it working to start with. Turns out reading text files dynamic with React.JS wasn't a easy task for a beginner developer.

Unfortunately I couldn't find any pictures of this project :()

So I quit this project... until now.

At the end of May 2024, I was wanting to start playing games and writing reviews on them, I was mainly wanting to revisit some old games from my childhood and see how would they play nowadays, and I'd share my thoughts, videos and images with friends, but, where?

Well, if you don't know me, I'm not really a social media person. There are times where I reply to someone almost a week after their message, and I don't do it 'cause I'm not interesting on having a talk with that person or anything, I literally forget that I should use social media. Actually, it depends. Some social platforms like Twitter and Facebook are ones that I consciously avoid, I think they are bad for anyone's mental health and you won't get anything good out of it.

The option left was to develop my own platform. I was skeptical about it at first, since my last attempt didn't succeed, but it was so long ago and I've learned os much those last years that I decided to give it a try, "Let's work on it for one or two days, if I can't get the basic functionality to work, I'll quit", I thought to myself. With that said, I started programming it on 31 May.

early development img

I got the basics working, and much more of what I was actually expecting to. I honestly don't know how I've managed to make a full working blog with comment feature in just 6 days. I'm very happy with the results and I'm really motivated to start writing more now that I have this dedicated space to write down anything.

Markdown files

One of the "special" features of this blog is that all the content you read is basically just a text file. It is a .md (Markdown) file.

md files

It means that I'm able to write stuff in here without adding or modifying a single line of code. I just create a new file, write stuff, and save it. And that's it. Well, I actually have to deploy the site to Vercel, It's like if the site in my local machine is a draft, and then when I'm ready to publish this draft, I deploy it to Vercel, which updates the blog online.

It makes it very scalable and easy to manage.

Programming

Besides the text files, of course the site is made of actual code. I've used Next.js framework to develop the site. For the styles I've been using Tailwind library. For storing the comments in a database, I'm using Prisma DB.

site code

The site works as following:

  • Theres this "Blog" folder where I store all my text files - that's the posts you read.
  • When the site is deployed, it reads the Blog folder, and generate static pages for every single text file, rendering it as a post.
  • There's soem special functions that gets executed while reading the folder, such as getting the posts' images, references and backlinks. You may also notice that some parts of this blog has special background images, some have the background cross-fading between the current post's images, and some will have a solid color when there's no special background associated with the folder, and no image is present on the post.
  • Theres a personal folder where I write my diary. I can see it but nobody else does. How? Magic.

Changelog

  • 2024-05-31: Started the development of the site.
  • 2024-06-04: Launch of the site.
  • 2024-06-05: Added dynamic backgrounds, started writing posts
  • 2024-06-19: Fixed comments not showing in posts residing inside folders; added post-based metadata
  • 2024-07-14: Added metadata visualization for posts; added latest posts list in the home page